package com.logic.landseaserver.persistence.read;

import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Param;

import com.logic.common.util.QueryUtil;
import com.logic.landseaserver.domain.PeopleInfo;
import com.logic.landseaserver.domain.Project;
import com.logic.landseaserver.models.news.bean.CodeResp;
import com.logic.landseaserver.models.rental.bean.ProjectDataBase;
import com.logic.landseaserver.models.workorder.bean.ProjectAndRoomResp;
import com.logic.landseaserver.ws.dto.ProjectDTO;
import com.logic.landseaserver.ws.dto.ProjectDetailDTO;
import com.logic.landseaserver.ws.dto.ProjectDetailForFrontDTO;
import com.logic.landseaserver.ws.response.AuthorizedItemResp;
import com.logic.landseaserver.ws.response.ExpenseTypeResp;
import com.logic.landseaserver.ws.response.MonthlyBillFeeResp;

public interface ProjectReadMapper {

    Project selectByPrimaryKey(Integer id);

    List<ProjectDTO> getProjectRespList(QueryUtil queryUtil);

    ProjectDetailDTO getProjectDetail(Integer id);

    List<Map<String, String>> getProjectListForFront(@Param("areaCode") String areaCode, @Param("isClassics") Integer isClassics);

    ProjectDetailForFrontDTO getProjectDetailForFront(@Param("id") Integer id);

    List<Map<String, String>> getProjectInfoWithArea();

    List<PeopleInfo> getShopKeeper(String areaCode);

    List<PeopleInfo> getCityKeeper(String areaCode);

    List<PeopleInfo> getHouseKeeper(String areaCode);

    Integer getMaxProCode(String code);

    List<Map<String, String>> getProjectListForBackend(@Param("areaCode") String areaCode, @Param("isClassics") Integer isClassics);

    Project selectProject(Integer id);
    
    Project selectExistsById(Integer id);
    
    /**
     * 
     * [简要描述]：查询项目基本信息，省市区国家</br>
     * [详细描述]：已经过滤删除态</br>
     * [作者]：Aaron(2017-06-29)</br>
     *
     * @param projectId 项目ID
     * @return ProjectDetailForFrontDTO
     *
     */
    ProjectDetailForFrontDTO selectProjectBaseInfo(Integer projectId);

    List<Project> selectProjectByArray(Integer[] projectId);
    
    List<String> queryNoRoomProject();

    List<AuthorizedItemResp> selectProjectAndCity(Integer userId);

    MonthlyBillFeeResp selectFeeType(Integer prjId);

    String selectAreaById(Integer projectId);

    List<ExpenseTypeResp> selectAuthArea(Integer userId);

    List<AuthorizedItemResp> selectAreaByUserId(Integer userId);

    List<ProjectAndRoomResp> getEffectiveProjectForAdmin(String phone);

    List<ProjectAndRoomResp> getEffectiveProject(Integer userId);

    List<ProjectAndRoomResp> getAllEffectiveProject();
    
    /**
     * 
     * [简要描述]：根据areaCode查询项目</br>
     * [详细描述]：发布的非删除的</br>
     * [作者]：Aaron(2017-12-15)</br>
     *
     * @param areaCode
     * @return
     *
     */
    List<Project> getProjectByArea(String areaCode);
    
    /**
     * 
     * [简要描述]：根据房间查询项目</br>
     * [详细描述]：</br>
     * [作者]：Aaron(2017-12-25)</br>
     *
     * @param roomId
     * @return
     *
     */
    Project getByRoomId(Integer roomId);
    
    /**
     * 
     * [简要描述]：集中式房源信息获取</br>
     * [详细描述]：获取项目信息</br>
     * [作者]：Crystal(2018-03-05)</br>
     *
     * @param 
     * @return
     *
     */
	List<ProjectDataBase> selectForYingShi(String time);
	
	List<String> getProjectFeesByPrjIds(@Param("projectIds") String projectIds);
	
	List<CodeResp> getAllMonthlyFeeCode();

	List<ExpenseTypeResp> selectFeeForMonth();

	List<String> selectProjectNameArray(List<Integer> projectIds);

	List<Project> selectPrjArray(List<Integer> projectIds);

    List<Project> selectChangeRoomList(Integer prjId,String sealId);
}